diff options
| author | Adam Soltys <[email protected]> | 2022-10-04 21:44:40 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-04 21:44:40 -0700 |
| commit | 5a7411bda445f09aa1da3aa171f7e10a5e91a7ab (patch) | |
| tree | d7af816fb56bb39ab4ccce0bb8059ab6dc6fc939 /src/routes/[username]/support/+page.server.js | |
| parent | a29f549b89f3e3294165dd2474e48dac274b4ab9 (diff) | |
| download | coinos-ui-5a7411bda445f09aa1da3aa171f7e10a5e91a7ab.tar.gz coinos-ui-5a7411bda445f09aa1da3aa171f7e10a5e91a7ab.zip | |
support endpoint
Diffstat (limited to 'src/routes/[username]/support/+page.server.js')
| -rw-r--r-- | src/routes/[username]/support/+page.server.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/routes/[username]/support/+page.server.js b/src/routes/[username]/support/+page.server.js new file mode 100644 index 00000000..a335ec96 --- /dev/null +++ b/src/routes/[username]/support/+page.server.js @@ -0,0 +1,13 @@ +export const actions = { + default: async ({ cookies, request }) => { + let form = Object.fromEntries(await request.formData()); + + try { + await post('/email', form); + } catch (e) { + return invalid(400, { failed: true }); + } + + return { success: true }; + } +}; |
